<?php 
/*
* StiPHPcms, A web Content management System made with PHP/MySQL
* JordSti : jord52@gmail.com
* Version : 0.0.2
*
* Copyright (C) 2009  jord52@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/


include "core/main.php";

$page = new CMSPage($cms_config);


$page->initLess();

$page->sql_query("INSERT INTO %prefix%modules VALUES('','wowarmory','wowarmory.php'0,1)");
$page->sql_query("INSERT INTO %prefix%modules VALUES('','wowrecruit','wowrecruit.php'0,1)");
$page->sql_query("INSERT INTO %prefix%modules VALUES('','raidplanner','raidplanner.php'0,1)");

$page->sql_query("CREATE TABLE IF NOT EXISTS `%prefix%members` (
  `id` int(255) NOT NULL auto_increment,
  `cname` varchar(64) NOT NULL,
  `lvl` int(255) NOT NULL,
  `achpoints` int(255) NOT NULL,
  `class` varchar(32) NOT NULL,
  `sex` int(2) NOT NULL,
  `race` varchar(32) NOT NULL,
  `rank` int(255) NOT NULL,
  `uid` int(25) NOT NULL,
  `lastup` int(32) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1;");

$page->sql_query("CREATE TABLE IF NOT EXISTS `%prefix%raidevent` (
  `id` int(25) NOT NULL auto_increment,
  `event` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `start` int(255) NOT NULL,
  `end` int(255) NOT NULL,
  `type` int(5) NOT NULL,
  `user_id` int(25) NOT NULL,
  `stamp` int(25) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;");
$page->sql_query("CREATE TABLE IF NOT EXISTS `%prefix%raidsignup` (
  `id` int(25) NOT NULL auto_increment,
  `event_id` int(25) NOT NULL,
  `member_id` int(25) NOT NULL,
  `user_id` int(25) NOT NULL,
  `stamp` int(25) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
$page->sql_query("CREATE TABLE IF NOT EXISTS `%prefix%recruitement` (
  `id` int(25) NOT NULL auto_increment,
  `cname` varchar(255) NOT NULL,
  `class` varchar(32) NOT NULL,
  `spec` varchar(32) NOT NULL,
  `armorylink` varchar(255) NOT NULL,
  `description` longtext NOT NULL,
  `status` int(12) NOT NULL,
  `user_id` int(25) NOT NULL,
  `stamp` int(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;");

$page->sql_query("CREATE TABLE IF NOT EXISTS `%prefix%recruitspot` (
  `id` int(25) NOT NULL auto_increment,
  `class` varchar(255) NOT NULL,
  `spec` varchar(255) NOT NULL,
  `open` int(2) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;");

$page->sql_query("INSERT INTO `%prefix%recruitspot` (`id`, `class`, `spec`, `open`) VALUES
(1, 'Death Knight', 'Unholy', 1),
(2, 'Druid', 'Feral Tank', 1),
(3, 'Hunter', '', 0),
(4, 'Mage', 'Frost/Arcane', 1),
(5, 'Paladin', 'Holy', 1),
(6, 'Priest', '', 0),
(7, 'Rogue', 'Assassinate', 1),
(8, 'Shaman', 'Elemental', 1),
(9, 'Warlock', '', 0),
(10, 'Warrior', '', 0);");

echo 'WoW CMS Modules installed ! Delete this file after !';
?>